<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>fdk-aac: original/libSBRdec/src/sbrdecoder.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">fdk-aac
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_ed137715e08969a186ec660e8ae6e2fb.html">original</a></li><li class="navelem"><a class="el" href="dir_222de58a05c98cc4a78309a37525cd28.html">libSBRdec</a></li><li class="navelem"><a class="el" href="dir_c997d48ad60fbe63e2ba342b9c79db98.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">sbrdecoder.cpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>SBR decoder frontend This module provides a frontend to the SBR decoder. The function openSBR() is called for initialization. The function <a class="el" href="sbrdecoder_8cpp.html#a5d847a76fce371fbb9f3ceffec08feca" title="This function decodes the given SBR bitstreams and applies SBR to the given time data.">sbrDecoder_Apply()</a> is called for each frame. sbr_Apply() will call the required functions to decode the raw SBR data (provided by <a class="el" href="env__extr_8cpp.html" title="Envelope extraction The functions provided by this module are mostly called by applySBR()....">env_extr.cpp</a>), to decode the envelope data and noise floor levels [<a class="el" href="env__dec_8cpp.html#ac15872b38c44f362cb162b328000d5ef" title="Convert raw envelope and noisefloor data to energy levels.">decodeSbrData()</a>], and to finally apply SBR to the current frame [<a class="el" href="sbr__dec_8cpp.html#a0afb25e3de966d0d3d171323b93d3f94" title="SBR decoder core function for one channel.">sbr_dec()</a>].  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;sbrdecoder.h&quot;</code><br />
<code>#include &quot;FDK_bitstream.h&quot;</code><br />
<code>#include &quot;<a class="el" href="sbrdec__freq__sca_8h_source.html">sbrdec_freq_sca.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="env__extr_8h_source.html">env_extr.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="sbr__dec_8h_source.html">sbr_dec.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="env__dec_8h_source.html">env_dec.h</a>&quot;</code><br />
<code>#include &quot;FDK_crc.h&quot;</code><br />
<code>#include &quot;<a class="el" href="sbr__ram_8h_source.html">sbr_ram.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="sbr__rom_8h_source.html">sbr_rom.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="lpp__tran_8h_source.html">lpp_tran.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="transcendent_8h_source.html">transcendent.h</a>&quot;</code><br />
<code>#include &quot;sbrdec_drc.h&quot;</code><br />
<code>#include &quot;psbitdec.h&quot;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a5890e9b7997211ebe5c4d1320a68e52c"><td class="memItemLeft" align="right" valign="top"><a id="a5890e9b7997211ebe5c4d1320a68e52c"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SBRDECODER_LIB_VL0</b>&#160;&#160;&#160;3</td></tr>
<tr class="separator:a5890e9b7997211ebe5c4d1320a68e52c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a222bfc77020ba5792e292487bc330937"><td class="memItemLeft" align="right" valign="top"><a id="a222bfc77020ba5792e292487bc330937"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SBRDECODER_LIB_VL1</b>&#160;&#160;&#160;1</td></tr>
<tr class="separator:a222bfc77020ba5792e292487bc330937"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af9bd832bbca3d6ec515e19709e85dc1c"><td class="memItemLeft" align="right" valign="top"><a id="af9bd832bbca3d6ec515e19709e85dc1c"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SBRDECODER_LIB_VL2</b>&#160;&#160;&#160;0</td></tr>
<tr class="separator:af9bd832bbca3d6ec515e19709e85dc1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0362d5ffe5df48cd0b8d9101602d586"><td class="memItemLeft" align="right" valign="top"><a id="ad0362d5ffe5df48cd0b8d9101602d586"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SBRDECODER_LIB_TITLE</b>&#160;&#160;&#160;&quot;SBR Decoder&quot;</td></tr>
<tr class="separator:ad0362d5ffe5df48cd0b8d9101602d586"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f569485bbc8f80c591dfdb083dc7c4f"><td class="memItemLeft" align="right" valign="top"><a id="a2f569485bbc8f80c591dfdb083dc7c4f"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SBRDECODER_LIB_BUILD_DATE</b>&#160;&#160;&#160;__DATE__</td></tr>
<tr class="separator:a2f569485bbc8f80c591dfdb083dc7c4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3217730672ba435c27129142a11a0347"><td class="memItemLeft" align="right" valign="top"><a id="a3217730672ba435c27129142a11a0347"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SBRDECODER_LIB_BUILD_TIME</b>&#160;&#160;&#160;__TIME__</td></tr>
<tr class="separator:a3217730672ba435c27129142a11a0347"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a5a76644e34291a929287dffae48116fe"><td class="memItemLeft" align="right" valign="top">SBR_ERROR&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sbrdecoder_8cpp.html#a5a76644e34291a929287dffae48116fe">sbrDecoder_Open</a> (<a class="el" href="struct_s_b_r___d_e_c_o_d_e_r___i_n_s_t_a_n_c_e.html">HANDLE_SBRDECODER</a> *pSelf, <a class="el" href="struct_f_d_k___q_m_f___d_o_m_a_i_n.html">HANDLE_FDK_QMF_DOMAIN</a> pQmfDomain)</td></tr>
<tr class="memdesc:a5a76644e34291a929287dffae48116fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates and initializes one SBR decoder instance.  <a href="sbrdecoder_8cpp.html#a5a76644e34291a929287dffae48116fe">More...</a><br /></td></tr>
<tr class="separator:a5a76644e34291a929287dffae48116fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0778d08c9951f26f099a8c56b22975e"><td class="memItemLeft" align="right" valign="top">SBR_ERROR&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sbrdecoder_8cpp.html#aa0778d08c9951f26f099a8c56b22975e">sbrDecoder_InitElement</a> (<a class="el" href="struct_s_b_r___d_e_c_o_d_e_r___i_n_s_t_a_n_c_e.html">HANDLE_SBRDECODER</a> self, const int sampleRateIn, const int sampleRateOut, const int samplesPerFrame, const <a class="el" href="_f_d_k__audio_8h.html#aa1570925f07a0866afc2681ce1408721">AUDIO_OBJECT_TYPE</a> coreCodec, const <a class="el" href="_f_d_k__audio_8h.html#a48f35f9a207b85a8144e1963183d8558">MP4_ELEMENT_ID</a> elementID, const int elementIndex, const <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> harmonicSBR, const <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> stereoConfigIndex, const <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> configMode, <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> *configChanged, const <a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a> downscaleFactor)</td></tr>
<tr class="memdesc:aa0778d08c9951f26f099a8c56b22975e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize a SBR decoder runtime instance. Must be called before decoding starts.  <a href="sbrdecoder_8cpp.html#aa0778d08c9951f26f099a8c56b22975e">More...</a><br /></td></tr>
<tr class="separator:aa0778d08c9951f26f099a8c56b22975e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31e6c6f610cbdebaa985bc9c8d9eb32f"><td class="memItemLeft" align="right" valign="top">SBR_ERROR&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sbrdecoder_8cpp.html#a31e6c6f610cbdebaa985bc9c8d9eb32f">sbrDecoder_FreeMem</a> (<a class="el" href="struct_s_b_r___d_e_c_o_d_e_r___i_n_s_t_a_n_c_e.html">HANDLE_SBRDECODER</a> *self)</td></tr>
<tr class="memdesc:a31e6c6f610cbdebaa985bc9c8d9eb32f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free config dependent SBR memory.  <a href="sbrdecoder_8cpp.html#a31e6c6f610cbdebaa985bc9c8d9eb32f">More...</a><br /></td></tr>
<tr class="separator:a31e6c6f610cbdebaa985bc9c8d9eb32f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afbc670500423a9d2d5b5e8ed58b853e2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sbrdecoder_8cpp.html#afbc670500423a9d2d5b5e8ed58b853e2">sbrDecoder_Header</a> (<a class="el" href="struct_s_b_r___d_e_c_o_d_e_r___i_n_s_t_a_n_c_e.html">HANDLE_SBRDECODER</a> self, <a class="el" href="struct_f_d_k___b_i_t_s_t_r_e_a_m.html">HANDLE_FDK_BITSTREAM</a> hBs, const <a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a> sampleRateIn, const <a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a> sampleRateOut, const <a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a> samplesPerFrame, const <a class="el" href="_f_d_k__audio_8h.html#aa1570925f07a0866afc2681ce1408721">AUDIO_OBJECT_TYPE</a> coreCodec, const <a class="el" href="_f_d_k__audio_8h.html#a48f35f9a207b85a8144e1963183d8558">MP4_ELEMENT_ID</a> elementID, const <a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a> elementIndex, const <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> harmonicSBR, const <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> stereoConfigIndex, const <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> configMode, <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> *configChanged, const <a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a> downscaleFactor)</td></tr>
<tr class="memdesc:afbc670500423a9d2d5b5e8ed58b853e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">pass out of band SBR header to SBR decoder  <a href="sbrdecoder_8cpp.html#afbc670500423a9d2d5b5e8ed58b853e2">More...</a><br /></td></tr>
<tr class="separator:afbc670500423a9d2d5b5e8ed58b853e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab951334675a0e70f8ca613131ae380d3"><td class="memItemLeft" align="right" valign="top">SBR_ERROR&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sbrdecoder_8cpp.html#ab951334675a0e70f8ca613131ae380d3">sbrDecoder_SetParam</a> (<a class="el" href="struct_s_b_r___d_e_c_o_d_e_r___i_n_s_t_a_n_c_e.html">HANDLE_SBRDECODER</a> self, const SBRDEC_PARAM param, const <a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a> value)</td></tr>
<tr class="memdesc:ab951334675a0e70f8ca613131ae380d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set a parameter of the SBR decoder runtime instance.  <a href="sbrdecoder_8cpp.html#ab951334675a0e70f8ca613131ae380d3">More...</a><br /></td></tr>
<tr class="separator:ab951334675a0e70f8ca613131ae380d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5b139845a403e6172950d2833ca90af"><td class="memItemLeft" align="right" valign="top">SBR_ERROR&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sbrdecoder_8cpp.html#ae5b139845a403e6172950d2833ca90af">sbrDecoder_drcFeedChannel</a> (<a class="el" href="struct_s_b_r___d_e_c_o_d_e_r___i_n_s_t_a_n_c_e.html">HANDLE_SBRDECODER</a> self, <a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a> ch, <a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a> numBands, FIXP_DBL *pNextFact_mag, <a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a> nextFact_exp, <a class="el" href="machine__type_8h.html#ac29555e80bd1ec1b5e40b732df417090">SHORT</a> drcInterpolationScheme, <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> winSequence, <a class="el" href="machine__type_8h.html#a17877e7a70f122032cacbbf98aad8b3d">USHORT</a> *pBandTop)</td></tr>
<tr class="memdesc:ae5b139845a403e6172950d2833ca90af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Feed DRC channel data into a SBR decoder runtime instance.  <a href="sbrdecoder_8cpp.html#ae5b139845a403e6172950d2833ca90af">More...</a><br /></td></tr>
<tr class="separator:ae5b139845a403e6172950d2833ca90af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acdc9903cdf42e6b932c0991631fc5bb3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sbrdecoder_8cpp.html#acdc9903cdf42e6b932c0991631fc5bb3">sbrDecoder_drcDisable</a> (<a class="el" href="struct_s_b_r___d_e_c_o_d_e_r___i_n_s_t_a_n_c_e.html">HANDLE_SBRDECODER</a> self, <a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a> ch)</td></tr>
<tr class="memdesc:acdc9903cdf42e6b932c0991631fc5bb3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable SBR DRC for a certain channel.  <a href="sbrdecoder_8cpp.html#acdc9903cdf42e6b932c0991631fc5bb3">More...</a><br /></td></tr>
<tr class="separator:acdc9903cdf42e6b932c0991631fc5bb3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ca7eae3c7a3350bf338f38ea9d5ea13"><td class="memItemLeft" align="right" valign="top">SBR_ERROR&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sbrdecoder_8cpp.html#a2ca7eae3c7a3350bf338f38ea9d5ea13">sbrDecoder_Parse</a> (<a class="el" href="struct_s_b_r___d_e_c_o_d_e_r___i_n_s_t_a_n_c_e.html">HANDLE_SBRDECODER</a> self, <a class="el" href="struct_f_d_k___b_i_t_s_t_r_e_a_m.html">HANDLE_FDK_BITSTREAM</a> hBs, <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> *pDrmBsBuffer, <a class="el" href="machine__type_8h.html#a17877e7a70f122032cacbbf98aad8b3d">USHORT</a> drmBsBufferSize, int *count, int bsPayLen, int crcFlag, <a class="el" href="_f_d_k__audio_8h.html#a48f35f9a207b85a8144e1963183d8558">MP4_ELEMENT_ID</a> prevElement, int elementIndex, <a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a> acFlags, <a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a> acElFlags[])</td></tr>
<tr class="memdesc:a2ca7eae3c7a3350bf338f38ea9d5ea13"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parse one SBR element data extension data block. The bit stream position will be placed at the end of the SBR payload block. The remaining bits will be returned into *count if a payload length is given (byPayLen &gt; 0). If no SBR payload length is given (bsPayLen &lt; 0) then the bit stream position on return will be random after this function call in case of errors, and any further decoding will be completely pointless. This function accepts either normal ordered SBR data or reverse ordered DRM SBR data.  <a href="sbrdecoder_8cpp.html#a2ca7eae3c7a3350bf338f38ea9d5ea13">More...</a><br /></td></tr>
<tr class="separator:a2ca7eae3c7a3350bf338f38ea9d5ea13"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d847a76fce371fbb9f3ceffec08feca"><td class="memItemLeft" align="right" valign="top">SBR_ERROR&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sbrdecoder_8cpp.html#a5d847a76fce371fbb9f3ceffec08feca">sbrDecoder_Apply</a> (<a class="el" href="struct_s_b_r___d_e_c_o_d_e_r___i_n_s_t_a_n_c_e.html">HANDLE_SBRDECODER</a> self, <a class="el" href="machine__type_8h.html#adeeed35101214b62ebabd7bf71f27ab1">LONG</a> *input, <a class="el" href="machine__type_8h.html#adeeed35101214b62ebabd7bf71f27ab1">LONG</a> *timeData, const int timeDataSize, int *numChannels, int *sampleRate, const <a class="el" href="struct_f_d_k__channel_map_descr.html">FDK_channelMapDescr</a> *const mapDescr, const int mapIdx, const int coreDecodedOk, <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> *psDecoded, const <a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a> inDataHeadroom, <a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a> *outDataHeadroom)</td></tr>
<tr class="memdesc:a5d847a76fce371fbb9f3ceffec08feca"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function decodes the given SBR bitstreams and applies SBR to the given time data.  <a href="sbrdecoder_8cpp.html#a5d847a76fce371fbb9f3ceffec08feca">More...</a><br /></td></tr>
<tr class="separator:a5d847a76fce371fbb9f3ceffec08feca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab683d55b9d62794ed0b8b509f0d6a098"><td class="memItemLeft" align="right" valign="top">SBR_ERROR&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sbrdecoder_8cpp.html#ab683d55b9d62794ed0b8b509f0d6a098">sbrDecoder_Close</a> (<a class="el" href="struct_s_b_r___d_e_c_o_d_e_r___i_n_s_t_a_n_c_e.html">HANDLE_SBRDECODER</a> *pSelf)</td></tr>
<tr class="memdesc:ab683d55b9d62794ed0b8b509f0d6a098"><td class="mdescLeft">&#160;</td><td class="mdescRight">Close SBR decoder instance and free memory.  <a href="sbrdecoder_8cpp.html#ab683d55b9d62794ed0b8b509f0d6a098">More...</a><br /></td></tr>
<tr class="separator:ab683d55b9d62794ed0b8b509f0d6a098"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23809ef2c98b444ca589a5fedca82cd3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sbrdecoder_8cpp.html#a23809ef2c98b444ca589a5fedca82cd3">sbrDecoder_GetLibInfo</a> (<a class="el" href="struct_l_i_b___i_n_f_o.html">LIB_INFO</a> *info)</td></tr>
<tr class="memdesc:a23809ef2c98b444ca589a5fedca82cd3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get SBR decoder library information.  <a href="sbrdecoder_8cpp.html#a23809ef2c98b444ca589a5fedca82cd3">More...</a><br /></td></tr>
<tr class="separator:a23809ef2c98b444ca589a5fedca82cd3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a54d7ec8602c453204d10bddeb9698bc7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sbrdecoder_8cpp.html#a54d7ec8602c453204d10bddeb9698bc7">sbrDecoder_GetDelay</a> (const <a class="el" href="struct_s_b_r___d_e_c_o_d_e_r___i_n_s_t_a_n_c_e.html">HANDLE_SBRDECODER</a> self)</td></tr>
<tr class="memdesc:a54d7ec8602c453204d10bddeb9698bc7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine the modules output signal delay in samples.  <a href="sbrdecoder_8cpp.html#a54d7ec8602c453204d10bddeb9698bc7">More...</a><br /></td></tr>
<tr class="separator:a54d7ec8602c453204d10bddeb9698bc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>SBR decoder frontend This module provides a frontend to the SBR decoder. The function openSBR() is called for initialization. The function <a class="el" href="sbrdecoder_8cpp.html#a5d847a76fce371fbb9f3ceffec08feca" title="This function decodes the given SBR bitstreams and applies SBR to the given time data.">sbrDecoder_Apply()</a> is called for each frame. sbr_Apply() will call the required functions to decode the raw SBR data (provided by <a class="el" href="env__extr_8cpp.html" title="Envelope extraction The functions provided by this module are mostly called by applySBR()....">env_extr.cpp</a>), to decode the envelope data and noise floor levels [<a class="el" href="env__dec_8cpp.html#ac15872b38c44f362cb162b328000d5ef" title="Convert raw envelope and noisefloor data to energy levels.">decodeSbrData()</a>], and to finally apply SBR to the current frame [<a class="el" href="sbr__dec_8cpp.html#a0afb25e3de966d0d3d171323b93d3f94" title="SBR decoder core function for one channel.">sbr_dec()</a>]. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="sbrdecoder_8cpp.html#a5d847a76fce371fbb9f3ceffec08feca" title="This function decodes the given SBR bitstreams and applies SBR to the given time data.">sbrDecoder_Apply()</a>, <a class="el" href="documentation_overview.html">Overview of important information resources and</a> </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a5d847a76fce371fbb9f3ceffec08feca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5d847a76fce371fbb9f3ceffec08feca">&#9670;&nbsp;</a></span>sbrDecoder_Apply()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SBR_ERROR sbrDecoder_Apply </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___d_e_c_o_d_e_r___i_n_s_t_a_n_c_e.html">HANDLE_SBRDECODER</a>&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#adeeed35101214b62ebabd7bf71f27ab1">LONG</a> *&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#adeeed35101214b62ebabd7bf71f27ab1">LONG</a> *&#160;</td>
          <td class="paramname"><em>timeData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>timeDataSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>numChannels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>sampleRate</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="struct_f_d_k__channel_map_descr.html">FDK_channelMapDescr</a> *const&#160;</td>
          <td class="paramname"><em>mapDescr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>mapIdx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>coreDecodedOk</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> *&#160;</td>
          <td class="paramname"><em>psDecoded</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a>&#160;</td>
          <td class="paramname"><em>inDataHeadroom</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a> *&#160;</td>
          <td class="paramname"><em>outDataHeadroom</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function decodes the given SBR bitstreams and applies SBR to the given time data. </p>
<p>SBR-processing works InPlace. I.e. the calling function has to provide a time domain buffer timeData which can hold the completely decoded result.</p>
<p>Left and right channel are read and stored according to the interleaving flag, frame length and number of channels.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>Handle of an open SBR decoder instance. </td></tr>
    <tr><td class="paramname">hSbrBs</td><td>SBR Bitstream handle. </td></tr>
    <tr><td class="paramname">input</td><td>Pointer to input data. </td></tr>
    <tr><td class="paramname">timeData</td><td>Pointer to upsampled output data. </td></tr>
    <tr><td class="paramname">timeDataSize</td><td>Size of timeData. </td></tr>
    <tr><td class="paramname">numChannels</td><td>Pointer to a buffer holding the number of channels in time data buffer. </td></tr>
    <tr><td class="paramname">sampleRate</td><td>Output samplerate. </td></tr>
    <tr><td class="paramname">channelMapping</td><td>Channel mapping indices. </td></tr>
    <tr><td class="paramname">coreDecodedOk</td><td>Flag indicating if the core decoder did not find any error (0: core decoder found errors, 1: no errors). </td></tr>
    <tr><td class="paramname">psDecoded</td><td>Pointer to a buffer holding a flag. Input: PS is possible, Output: PS has been rendered. </td></tr>
    <tr><td class="paramname">inDataHeadroom</td><td>Headroom of the SBR input time signal to prevent clipping. </td></tr>
    <tr><td class="paramname">outDataHeadroom</td><td>Pointer to headroom of the SBR output time signal to prevent clipping.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Error code. </dd></dl>

</div>
</div>
<a id="ab683d55b9d62794ed0b8b509f0d6a098"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab683d55b9d62794ed0b8b509f0d6a098">&#9670;&nbsp;</a></span>sbrDecoder_Close()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SBR_ERROR sbrDecoder_Close </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___d_e_c_o_d_e_r___i_n_s_t_a_n_c_e.html">HANDLE_SBRDECODER</a> *&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Close SBR decoder instance and free memory. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>SBR decoder handle. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Error Code. </dd></dl>

</div>
</div>
<a id="acdc9903cdf42e6b932c0991631fc5bb3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acdc9903cdf42e6b932c0991631fc5bb3">&#9670;&nbsp;</a></span>sbrDecoder_drcDisable()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sbrDecoder_drcDisable </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___d_e_c_o_d_e_r___i_n_s_t_a_n_c_e.html">HANDLE_SBRDECODER</a>&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a>&#160;</td>
          <td class="paramname"><em>ch</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disable SBR DRC for a certain channel. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hSbrDecoder</td><td>SBR decoder handle. </td></tr>
    <tr><td class="paramname">ch</td><td>Number of the channel that has to be disabled.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None. </dd></dl>

</div>
</div>
<a id="ae5b139845a403e6172950d2833ca90af"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae5b139845a403e6172950d2833ca90af">&#9670;&nbsp;</a></span>sbrDecoder_drcFeedChannel()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SBR_ERROR sbrDecoder_drcFeedChannel </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___d_e_c_o_d_e_r___i_n_s_t_a_n_c_e.html">HANDLE_SBRDECODER</a>&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a>&#160;</td>
          <td class="paramname"><em>ch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a>&#160;</td>
          <td class="paramname"><em>numBands</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FIXP_DBL *&#160;</td>
          <td class="paramname"><em>pNextFact_mag</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a>&#160;</td>
          <td class="paramname"><em>nextFact_exp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#ac29555e80bd1ec1b5e40b732df417090">SHORT</a>&#160;</td>
          <td class="paramname"><em>drcInterpolationScheme</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a>&#160;</td>
          <td class="paramname"><em>winSequence</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#a17877e7a70f122032cacbbf98aad8b3d">USHORT</a> *&#160;</td>
          <td class="paramname"><em>pBandTop</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Feed DRC channel data into a SBR decoder runtime instance. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>SBR decoder handle. </td></tr>
    <tr><td class="paramname">ch</td><td>Channel number to which the DRC data is associated to. </td></tr>
    <tr><td class="paramname">numBands</td><td>Number of DRC bands. </td></tr>
    <tr><td class="paramname">pNextFact_mag</td><td>Pointer to a table with the DRC factor magnitudes. </td></tr>
    <tr><td class="paramname">nextFact_exp</td><td>Exponent for all DRC factors. </td></tr>
    <tr><td class="paramname">drcInterpolationScheme</td><td>DRC interpolation scheme. </td></tr>
    <tr><td class="paramname">winSequence</td><td>Window sequence from core coder (eight short or one long window). </td></tr>
    <tr><td class="paramname">pBandTop</td><td>Pointer to a table with the top borders for all DRC bands.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Error code. </dd></dl>

</div>
</div>
<a id="a31e6c6f610cbdebaa985bc9c8d9eb32f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31e6c6f610cbdebaa985bc9c8d9eb32f">&#9670;&nbsp;</a></span>sbrDecoder_FreeMem()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SBR_ERROR sbrDecoder_FreeMem </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___d_e_c_o_d_e_r___i_n_s_t_a_n_c_e.html">HANDLE_SBRDECODER</a> *&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Free config dependent SBR memory. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>SBR decoder instance handle </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a54d7ec8602c453204d10bddeb9698bc7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a54d7ec8602c453204d10bddeb9698bc7">&#9670;&nbsp;</a></span>sbrDecoder_GetDelay()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a> sbrDecoder_GetDelay </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_s_b_r___d_e_c_o_d_e_r___i_n_s_t_a_n_c_e.html">HANDLE_SBRDECODER</a>&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Determine the modules output signal delay in samples. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>SBR decoder handle. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of samples signal delay added by the module. </dd></dl>

</div>
</div>
<a id="a23809ef2c98b444ca589a5fedca82cd3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a23809ef2c98b444ca589a5fedca82cd3">&#9670;&nbsp;</a></span>sbrDecoder_GetLibInfo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a> sbrDecoder_GetLibInfo </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_l_i_b___i_n_f_o.html">LIB_INFO</a> *&#160;</td>
          <td class="paramname"><em>info</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get SBR decoder library information. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">info</td><td>Pointer to a <a class="el" href="struct_l_i_b___i_n_f_o.html">LIB_INFO</a> struct, where library information is written to. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success, -1 if invalid handle or if no free element is available to write information to. </dd></dl>

</div>
</div>
<a id="afbc670500423a9d2d5b5e8ed58b853e2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afbc670500423a9d2d5b5e8ed58b853e2">&#9670;&nbsp;</a></span>sbrDecoder_Header()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a> sbrDecoder_Header </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___d_e_c_o_d_e_r___i_n_s_t_a_n_c_e.html">HANDLE_SBRDECODER</a>&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_f_d_k___b_i_t_s_t_r_e_a_m.html">HANDLE_FDK_BITSTREAM</a>&#160;</td>
          <td class="paramname"><em>hBs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a>&#160;</td>
          <td class="paramname"><em>sampleRateIn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a>&#160;</td>
          <td class="paramname"><em>sampleRateOut</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a>&#160;</td>
          <td class="paramname"><em>samplesPerFrame</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="_f_d_k__audio_8h.html#aa1570925f07a0866afc2681ce1408721">AUDIO_OBJECT_TYPE</a>&#160;</td>
          <td class="paramname"><em>coreCodec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="_f_d_k__audio_8h.html#a48f35f9a207b85a8144e1963183d8558">MP4_ELEMENT_ID</a>&#160;</td>
          <td class="paramname"><em>elementID</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a>&#160;</td>
          <td class="paramname"><em>elementIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a>&#160;</td>
          <td class="paramname"><em>harmonicSBR</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a>&#160;</td>
          <td class="paramname"><em>stereoConfigIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a>&#160;</td>
          <td class="paramname"><em>configMode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> *&#160;</td>
          <td class="paramname"><em>configChanged</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a>&#160;</td>
          <td class="paramname"><em>downscaleFactor</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>pass out of band SBR header to SBR decoder </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>Handle to a SBR decoder instance. </td></tr>
    <tr><td class="paramname">hBs</td><td>bit stream handle data source. </td></tr>
    <tr><td class="paramname">sampleRateIn</td><td>SBR input sampling rate </td></tr>
    <tr><td class="paramname">sampleRateOut</td><td>SBR output sampling rate </td></tr>
    <tr><td class="paramname">samplesPerFrame</td><td>frame length </td></tr>
    <tr><td class="paramname">elementID</td><td>SBR element ID. </td></tr>
    <tr><td class="paramname">elementIndex</td><td>SBR element index. </td></tr>
    <tr><td class="paramname">harmonicSBR</td><td></td></tr>
    <tr><td class="paramname">stereoConfigIndex</td><td></td></tr>
    <tr><td class="paramname">downscaleFactor</td><td>ELD downscale factor</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Error code. </dd></dl>

</div>
</div>
<a id="aa0778d08c9951f26f099a8c56b22975e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa0778d08c9951f26f099a8c56b22975e">&#9670;&nbsp;</a></span>sbrDecoder_InitElement()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SBR_ERROR sbrDecoder_InitElement </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___d_e_c_o_d_e_r___i_n_s_t_a_n_c_e.html">HANDLE_SBRDECODER</a>&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>sampleRateIn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>sampleRateOut</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>samplesPerFrame</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="_f_d_k__audio_8h.html#aa1570925f07a0866afc2681ce1408721">AUDIO_OBJECT_TYPE</a>&#160;</td>
          <td class="paramname"><em>coreCodec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="_f_d_k__audio_8h.html#a48f35f9a207b85a8144e1963183d8558">MP4_ELEMENT_ID</a>&#160;</td>
          <td class="paramname"><em>elementID</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>elementIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a>&#160;</td>
          <td class="paramname"><em>harmonicSBR</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a>&#160;</td>
          <td class="paramname"><em>stereoConfigIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a>&#160;</td>
          <td class="paramname"><em>configMode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> *&#160;</td>
          <td class="paramname"><em>configChanged</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a>&#160;</td>
          <td class="paramname"><em>downscaleFactor</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize a SBR decoder runtime instance. Must be called before decoding starts. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>Handle to a SBR decoder instance. </td></tr>
    <tr><td class="paramname">sampleRateIn</td><td>Input samplerate of the SBR decoder instance. </td></tr>
    <tr><td class="paramname">sampleRateOut</td><td>Output samplerate of the SBR decoder instance. </td></tr>
    <tr><td class="paramname">samplesPerFrame</td><td>Number of samples per frames. </td></tr>
    <tr><td class="paramname">coreCodec</td><td>Audio Object Type (AOT) of the core codec. </td></tr>
    <tr><td class="paramname">elementID</td><td>Table with MPEG-4 element Ids in canonical order. </td></tr>
    <tr><td class="paramname">elementIndex</td><td>SBR element index </td></tr>
    <tr><td class="paramname">harmonicSBR</td><td></td></tr>
    <tr><td class="paramname">stereoConfigIndex</td><td></td></tr>
    <tr><td class="paramname">downscaleFactor</td><td>ELD downscale factor </td></tr>
    <tr><td class="paramname">configMode</td><td>Table with MPEG-4 element Ids in canonical order. </td></tr>
    <tr><td class="paramname">configChanged</td><td>Flag that enforces a complete decoder reset.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Error code. </dd></dl>

</div>
</div>
<a id="a5a76644e34291a929287dffae48116fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5a76644e34291a929287dffae48116fe">&#9670;&nbsp;</a></span>sbrDecoder_Open()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SBR_ERROR sbrDecoder_Open </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___d_e_c_o_d_e_r___i_n_s_t_a_n_c_e.html">HANDLE_SBRDECODER</a> *&#160;</td>
          <td class="paramname"><em>pSelf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_f_d_k___q_m_f___d_o_m_a_i_n.html">HANDLE_FDK_QMF_DOMAIN</a>&#160;</td>
          <td class="paramname"><em>pQmfDomain</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Allocates and initializes one SBR decoder instance. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pSelf</td><td>Pointer to where a SBR decoder handle is copied into. </td></tr>
    <tr><td class="paramname">pQmfDomain</td><td>Pointer to QMF domain data structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Error code. </dd></dl>

</div>
</div>
<a id="a2ca7eae3c7a3350bf338f38ea9d5ea13"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2ca7eae3c7a3350bf338f38ea9d5ea13">&#9670;&nbsp;</a></span>sbrDecoder_Parse()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SBR_ERROR sbrDecoder_Parse </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___d_e_c_o_d_e_r___i_n_s_t_a_n_c_e.html">HANDLE_SBRDECODER</a>&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_f_d_k___b_i_t_s_t_r_e_a_m.html">HANDLE_FDK_BITSTREAM</a>&#160;</td>
          <td class="paramname"><em>hBs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> *&#160;</td>
          <td class="paramname"><em>pDrmBsBuffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#a17877e7a70f122032cacbbf98aad8b3d">USHORT</a>&#160;</td>
          <td class="paramname"><em>drmBsBufferSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>bsPayLen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>crcFlag</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_f_d_k__audio_8h.html#a48f35f9a207b85a8144e1963183d8558">MP4_ELEMENT_ID</a>&#160;</td>
          <td class="paramname"><em>prev_element</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>element_index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a>&#160;</td>
          <td class="paramname"><em>acFlags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a>&#160;</td>
          <td class="paramname"><em>acElFlags</em>[]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Parse one SBR element data extension data block. The bit stream position will be placed at the end of the SBR payload block. The remaining bits will be returned into *count if a payload length is given (byPayLen &gt; 0). If no SBR payload length is given (bsPayLen &lt; 0) then the bit stream position on return will be random after this function call in case of errors, and any further decoding will be completely pointless. This function accepts either normal ordered SBR data or reverse ordered DRM SBR data. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>SBR decoder handle. </td></tr>
    <tr><td class="paramname">hBs</td><td>Bit stream handle as data source. </td></tr>
    <tr><td class="paramname">count</td><td>Pointer to an integer where the amount of parsed SBR payload bits is stored into. </td></tr>
    <tr><td class="paramname">bsPayLen</td><td>If &gt; 0 this value is the SBR payload length. If &lt; 0, the SBR payload length is unknown. </td></tr>
    <tr><td class="paramname">flags</td><td>CRC flag (0: EXT_SBR_DATA; 1: EXT_SBR_DATA_CRC) </td></tr>
    <tr><td class="paramname">prev_element</td><td>Previous MPEG-4 element ID. </td></tr>
    <tr><td class="paramname">element_index</td><td>Index of the current element. </td></tr>
    <tr><td class="paramname">acFlags</td><td>Audio codec flags</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Error code. </dd></dl>

</div>
</div>
<a id="ab951334675a0e70f8ca613131ae380d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab951334675a0e70f8ca613131ae380d3">&#9670;&nbsp;</a></span>sbrDecoder_SetParam()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SBR_ERROR sbrDecoder_SetParam </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___d_e_c_o_d_e_r___i_n_s_t_a_n_c_e.html">HANDLE_SBRDECODER</a>&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const SBRDEC_PARAM&#160;</td>
          <td class="paramname"><em>param</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a>&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set a parameter of the SBR decoder runtime instance. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>SBR decoder handle. </td></tr>
    <tr><td class="paramname">param</td><td>Parameter which will be set if successfull. </td></tr>
    <tr><td class="paramname">value</td><td>New parameter value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Error code. </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
